<template>
    <div>
        数字一：{{ number1 }}
    </div>
    <div>
        数字二：{{ number2 }}
    </div>
    <button @click="addNumber"> +1 </button>
    <button @click="jianNumber"> -1 </button>
    <my-button></my-button>
</template>

<script>
export default {
    data() {
        return {
            number1: 0,
            number2: 0
        }
    },
    methods: {
        addNumber() {
            this.number1++;
        },
        jianNumber() {
            this.number2--
        }
    },
    beforeCreate(){
        console.log(this.number1,'===beforeCreate==')
    },
    created(){  
        console.log(this.number1, '===created==')
    }
}
</script>